package com.niiwoo.civet.scheduler.trigger;

import com.alibaba.dubbo.config.annotation.Reference;
import com.niiwoo.civet.trade.service.invest.InvestDubboService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * Created by lixiang on 2017/11/22.
 * 撤投批处理
 */
@Component
public class InvestCancelJobTrigger {
	private static final Logger logger = LoggerFactory.getLogger(InvestCancelJobTrigger.class);

	@Reference(version = "1.0.0")
	private InvestDubboService investDubboService;

	@Scheduled(cron = "${invest.order-batch-process}")
	public void revertAutoInvestorQueue() {
		logger.info("调度流标的投资订单撤投");
		investDubboService.batchInvestCancel();
	}

}
